﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Skyworth.CRM.Service.IBLL;
using Skyworth.CRM.Service.IDAL;

namespace Skyworth.CRM.BLL
{
    public class LetterOfAdviceBLL : ILetterOfAdviceBLL
    {
        private ILetterOfAdviceDAL _letterOfAdvice;

        public LetterOfAdviceBLL(ILetterOfAdviceDAL letterOfAdvice)
        {
            _letterOfAdvice = letterOfAdvice;
        }

        public DataTable GetLetterOfAdviceByPage(string strWhere, string strOrderBy, int pageIndex, int pageSize, out int recordCount, out int pageCount)
        {
            return _letterOfAdvice.GetLetterOfAdviceByPage(strWhere, strOrderBy, pageIndex, pageSize, out recordCount,
                                                           out pageCount);
            
        }

        public DataTable GetDetailedLetterOfAdviceByPage(string strWhere, string strOrderBy, int pageIndex, int pageSize, out int recordCount, out int pageCount)
        {
            return _letterOfAdvice.GetDetailedLetterOfAdviceByPage(strWhere, strOrderBy, pageIndex, pageSize, out recordCount,
                                                           out pageCount);

        }

        public string Export2Excel(string strWhere)
        {
            return _letterOfAdvice.Export2Excel(strWhere);
        }
    }
}
